var h = $(window).height();
var h1 = $('.header').height();
var h2 = $('.ditu').height();
var height =  h-h1-h2;
$('#map').height(h);
var xx = 116.397428;
var yy = 39.90923;  
var gpsPoint = new BMap.Point(xx,yy);

//地图初始化
var bm = new BMap.Map("map");
bm.centerAndZoom(gpsPoint, 15);
bm.addControl(new BMap.NavigationControl());

//坐标转换完之后的回调函数

//此处显示的就是纠偏后的经纬度
translateCallback = function (point){
	var marker = new BMap.Marker(point);
	bm.addOverlay(marker);
	bm.setCenter(point);
}
BMap.Convertor.translate(gpsPoint,0,translateCallback);     //真实经纬度转成百度坐标